package com.aizuda.boot.modules.business.negotiation.mapper;

import com.aizuda.boot.modules.business.negotiation.entity.ContractNegotiationParticipantEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 合同协商参与者Mapper接口
 */
@Mapper
public interface ContractNegotiationParticipantMapper extends BaseMapper<ContractNegotiationParticipantEntity> {
    
    /**
     * 根据协商实例ID查询参与者列表
     * @param instanceId 协商实例ID
     * @return 参与者列表
     */
    List<ContractNegotiationParticipantEntity> selectByInstanceId(@Param("instanceId") Integer instanceId);
    
    /**
     * 根据节点实例ID查询参与者列表
     * @param nodeInstanceId 节点实例ID
     * @return 参与者列表
     */
    List<ContractNegotiationParticipantEntity> selectByNodeInstanceId(@Param("nodeInstanceId") Integer nodeInstanceId);
    
    /**
     * 根据协商实例ID和员工ID查询参与者
     * @param instanceId 协商实例ID
     * @param employeeId 员工ID
     * @return 参与者
     */
    ContractNegotiationParticipantEntity selectByInstanceIdAndEmployeeId(
            @Param("instanceId") Integer instanceId, 
            @Param("employeeId") Long employeeId
    );
} 